﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Model.Sec
{
    public class Tree
    {
        string _checkNodeIDS;
        /// <summary>
        /// 选择节点的value值,形式为,1,2,3,.....最后一个字符为英文逗号
        /// </summary>
        public string CheckNodeIDS
        {
            get { return _checkNodeIDS; }
            set { _checkNodeIDS = value; }
        }

        bool _isCheckedAllChildren = false;
        /// <summary> 
        /// 父节点选中时，子节点是否选中
        /// </summary>
        public bool IsCheckedAllChildren
        {
            get { return _isCheckedAllChildren; }
            set { _isCheckedAllChildren = value; }
        }

        string _rootnode;
        /// <summary>
        /// 生成根节点的文本
        /// </summary>
        public string RootNode
        {
            get { return _rootnode; }
            set { _rootnode = value; }
        }
      
        
        #region 第一层节点的属性
        bool _isFirstCheckBox = false;
        /// <summary>
        /// 第一层节点是否显示复选框
        /// </summary>
        public bool IsFirstCheckBox
        {
            get { return _isFirstCheckBox; }
            set { _isFirstCheckBox = value; }
        }
        string _firstOperateID;
        /// <summary>
        /// 第一层节点操作页面的权限ID
        /// </summary>
        public string FirstOperateID
        {
            get { return _firstOperateID; }
            set { _firstOperateID = value; }
        }
        string _firstTarget = string.Empty;
        /// <summary>
        /// 第一层节点导航的目标
        /// </summary>
        public string FirstTarget
        {
            get { return _firstTarget; }
            set { _firstTarget = value; }
        }
        string _firstUrl = string.Empty;
        /// <summary>
        /// 第一层节点导航的链接地址
        /// </summary>
        public string FirstUrl
        {
            get { return _firstUrl; }
            set { _firstUrl = value; }
        }
        string _firstKey;
        /// <summary>
        /// 如果FirstValue不是表的主键，需要增加此字段
        /// </summary>
        public string FirstKey
        {
            get { return _firstKey; }
            set { _firstKey = value; }
        }
        string _firstImgUrl;
        /// <summary>
        /// 不挂第二层节点的图片Url
        /// </summary>
        public string FirstImgUrl
        {
            get { return _firstImgUrl; }
            set { _firstImgUrl = value; }
        }
        string _firstHasSecondImgUrl;
        /// <summary>
        /// 挂有第2层节点的图片url
        /// </summary>
        public string FirstHasImgUrl
        {
            get { return _firstHasSecondImgUrl; }
            set { _firstHasSecondImgUrl = value; }
        }

        string _hasSecondField;
        /// <summary>
        /// 是否有第二层节点的字段
        /// </summary>
        public string HasScondField
        {
            get { return _hasSecondField; }
            set { _hasSecondField = value; }
        }

        string _hasSecondFieldValue;
        /// <summary>
        /// 有第二层节点字段的值
        /// </summary>
        public string HasScondFieldValue
        {
            get { return _hasSecondFieldValue; }
            set { _hasSecondFieldValue = value; }
        }

        string _firstTable;
        /// <summary>
        /// 查找的第一层表名
        /// </summary>
        public string FirstTable
        {
            get { return _firstTable; }
            set { _firstTable = value; }
        }
        string _firstValue;
        /// <summary>
        /// 第一层节点的Value值，根据节点的value__来生成第二层节点
        /// </summary>
        public string FirstValue
        {
            get { return _firstValue; }
            set { _firstValue = value; }
        }
        string _firstText;
        /// <summary>
        /// 第一层节点的Text值
        /// </summary>
        public string FirstText
        {
            get { return _firstText; }
            set { _firstText = value; }
        }
        string _firstOtherField = string.Empty;
        /// <summary>
        /// 要给第一层节点绑定的其他字段,以英文逗号,分开如1,2,3....最后一个字符不能是,
        /// 绑定在第一层节点上的属性分别为field1,field2,.....
        /// </summary>
        public string FirstOtherField
        {
            get { return _firstOtherField; }
            set { _firstOtherField = value; }
        }
        string _firstWhere = string.Empty;
        /// <summary>
        /// 第一层节点查找条件,不用加where关键字
        /// </summary>
        public string FirstWhere
        {
            get { return _firstWhere; }
            set { _firstWhere = value; }
        }
        string _firstOrderBy = string.Empty;
        /// <summary>
        /// 生成的第一层节点顺序,此字段可以转化为数字,不然出错。
        /// </summary>
        public string FirstOrderBy
        {
            get { return _firstOrderBy; }
            set { _firstOrderBy = value; }
        }
        #endregion

        #region 第二层节点的属性
        bool _isSecondCheckBox = false;
        /// <summary>
        /// 第二层节点是否显示复选框
        /// </summary>
        public bool IsSecondCheckBox
        {
            get { return _isSecondCheckBox; }
            set { _isSecondCheckBox = value; }
        }
        string _secondOperateID;
        /// <summary>
        /// 第二层节点操作页面的权限ID
        /// </summary>
        public string SecondOperateID
        {
            get { return _secondOperateID; }
            set { _secondOperateID = value; }
        }
        string _secondTarget = string.Empty;
        /// <summary>
        /// 第二层节点导航的目标
        /// </summary>
        public string SecondTarget
        {
            get { return _secondTarget; }
            set { _secondTarget = value; }
        }
        string _secondUrl = string.Empty;
        /// <summary>
        /// 第二层节点导航的链接地址
        /// </summary>
        public string SecondUrl
        {
            get { return _secondUrl; }
            set { _secondUrl = value; }
        }
        string _secondKey;
        /// <summary>
        /// 如果SecondValue不是表的主键，需要增加此字段
        /// </summary>
        public string SecondKey
        {
            get { return _secondKey; }
            set { _secondKey = value; }
        }
        string _secondImgUrl;
        /// <summary>
        /// 第二层节点的图片Url
        /// </summary>
        public string SecondImgUrl
        {
            get { return _secondImgUrl; }
            set { _secondImgUrl = value; }
        }

        string _secondTable = string.Empty;
        /// <summary>
        /// 查找的第二层表名
        /// </summary>
        public string SecondTable
        {
            get { return _secondTable; }
            set { _secondTable = value; }
        }
        string _secondValue;
        /// <summary>
        /// 第二层节点的Value值，根据节点的value__来生成第二层节点
        /// </summary>
        public string SecondValue
        {
            get { return _secondValue; }
            set { _secondValue = value; }
        }
        string _secondText;
        /// <summary>
        /// 第二层节点的Text值
        /// </summary>
        public string SecondText
        {
            get { return _secondText; }
            set { _secondText = value; }
        }
        string _secondOtherField = string.Empty;
        /// <summary>
        /// 要给第二层节点绑定的其他字段,以逗号,分开如1,2,3....最后一个不要加,了
        /// 绑定在第二层节点上的属性分别为field1,field2,.....
        /// </summary>
        public string SecondOtherField
        {
            get { return _secondOtherField; }
            set { _secondOtherField = value; }
        }

        string _secondOrderBy = string.Empty;
        /// <summary>
        /// 生成的第二层节点顺序,此字段可以转化为数字,不然出错。
        /// </summary>
        public string SecondOrderBy
        {
            get { return _secondOrderBy; }
            set { _secondOrderBy = value; }
        }

        string _createByFirstField;
        /// <summary>
        /// 第二层节点根据第一层节点生成的字段
        /// </summary>
        public string CreateByFirstField
        {
            get { return _createByFirstField; }
            set { _createByFirstField = value; }
        }
        #endregion

        #region 第三层节点的属性
        bool _isThirdCheckBox = false;
        /// <summary>
        /// 第三层节点是否显示复选框
        /// </summary>
        public bool IsThirdCheckBox
        {
            get { return _isThirdCheckBox; }
            set { _isThirdCheckBox = value; }
        }
        string _thirdOperateID;
        /// <summary>
        /// 第二层节点操作页面的权限ID
        /// </summary>
        public string ThirdOperateID
        {
            get { return _thirdOperateID; }
            set { _thirdOperateID = value; }
        }
        string _thirdTarget = string.Empty;
        /// <summary>
        /// 第三层节点导航的目标
        /// </summary>
        public string ThirdTarget
        {
            get { return _thirdTarget; }
            set { _thirdTarget = value; }
        }
        string _thirdUrl = string.Empty;
        /// <summary>
        /// 第三层节点导航的链接地址
        /// </summary>
        public string ThirdUrl
        {
            get { return _thirdUrl; }
            set { _thirdUrl = value; }
        }
        string _thirdKey;
        /// <summary>
        /// 如果ThirdValue不是表的主键，需要增加此字段
        /// </summary>
        public string ThirdKey
        {
            get { return _thirdKey; }
            set { _thirdKey = value; }
        }
        string _thirdImgUrl;
        /// <summary>
        /// 第三层节点的图片Url
        /// </summary>
        public string ThirdImgUrl
        {
            get { return _thirdImgUrl; }
            set { _thirdImgUrl = value; }
        }

        string _thirdTable = string.Empty;
        /// <summary>
        /// 查找的第三层表名
        /// </summary>
        public string ThirdTable
        {
            get { return _thirdTable; }
            set { _thirdTable = value; }
        }
        string _thirdValue;
        /// <summary>
        /// 第三层节点的Value值，根据节点的value__来生成第二层节点
        /// </summary>
        public string ThirdValue
        {
            get { return _thirdValue; }
            set { _thirdValue = value; }
        }
        string _thirdText;
        /// <summary>
        /// 第三层节点的Text值
        /// </summary>
        public string ThirdText
        {
            get { return _thirdText; }
            set { _thirdText = value; }
        }
        string _thirdOtherField = string.Empty;
        /// <summary>
        /// 要给第三层节点绑定的其他字段,以逗号,分开如1,2,3....最后一个不要加,了
        /// 绑定在第三层节点上的属性分别为field1,field2,.....
        /// </summary>
        public string ThirdOtherField
        {
            get { return _thirdOtherField; }
            set { _thirdOtherField = value; }
        }

        string _thirdOrderBy = string.Empty;
        /// <summary>
        /// 生成的第三层节点顺序,此字段可以转化为数字,不然出错。
        /// </summary>
        public string ThirdOrderBy
        {
            get { return _thirdOrderBy; }
            set { _thirdOrderBy = value; }
        }
        string _createBySecondField;
        /// <summary>
        /// 第三层节点根据第二层节点生成的字段
        /// </summary>
        public string CreateBySecondField
        {
            get { return _createBySecondField; }
            set { _createBySecondField = value; }
        }
        #endregion
    }
}
